<template>
  <div class="warp">
    <h3>这是子组件</h3>
    <span v-for="(itemData,index) in ItemList" :key="index">
         <slot :itemData="itemData"></slot>
    </span>
    <slot :itemData1="data1">
    </slot>
    <slot itemData2="caiwenmin">
    </slot>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        name: "ChilderVm",
        data1:"shiqinlong",
        data2:'caiwenmin',
        ItemList: [
          {
            name: 'shiqla',
            age: 12,
            address: 'xian'
          },
          {
            name: 'caiwenmin',
            age: 22,
            address: 'xian'
          },
          {
            name: "shimeeng",
            age: 22,
            address: 'shenzhen'
          }

        ]
      }
    }
  }
</script>

<style scoped>
  .warp {
    width: 95%;
    margin: 5px auto;
    border: 1px red dashed;
    text-align: center;
  }
</style>
